package com.code.generation.vo.table;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.List;
import java.util.Set;

/**
 * @ProjectName: codegeneration
 * @Package: com.code.generation.vo.table
 * @Description:
 * @Author: DongJW
 * @CreateDate: 2020/11/29 11:29
 * @Version: 1.0
 */
public class Table {

    /**
     * 数据库表名
     */
    private String tableName;

    /**
     * 处理后的数据库表名
     */
    private String tableNameExt;

    /**
     * 表名首字母小写
     */
    private String tableNameExt1;

    /**
     * 描述
     */
    private String comment;

    /**
     * 主键
     */
    private String primaryKey;

    /**
     * 主键属性值
     */
    private String primaryKeyExt;

    /**
     * 主键java类型
     */
    private String primaryKeyType;

    /**
     * 主键的全路径
     */
    private String primaryKeyTypePath;

    /**
     * 列数据
     */
    private List<Column> columns;

    /**
     * 属性类型集合，用于创建实体时import第三方包
     */
    private Set<String> columnTypeSet;

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    public String getTableNameExt() {
        return tableNameExt;
    }

    public void setTableNameExt(String tableNameExt) {
        this.tableNameExt = tableNameExt;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public String getPrimaryKey() {
        return primaryKey;
    }

    public void setPrimaryKey(String primaryKey) {
        this.primaryKey = primaryKey;
    }

    public List<Column> getColumns() {
        return columns;
    }

    public void setColumns(List<Column> columns) {
        this.columns = columns;
    }

    public Set<String> getColumnTypeSet() {
        return columnTypeSet;
    }

    public void setColumnTypeSet(Set<String> columnTypeSet) {
        this.columnTypeSet = columnTypeSet;
    }

    public String getPrimaryKeyType() {
        return primaryKeyType;
    }

    public void setPrimaryKeyType(String primaryKeyType) {
        this.primaryKeyType = primaryKeyType;
    }

    public String getPrimaryKeyExt() {
        return primaryKeyExt;
    }

    public void setPrimaryKeyExt(String primaryKeyExt) {
        this.primaryKeyExt = primaryKeyExt;
    }

    public String getPrimaryKeyTypePath() {
        return primaryKeyTypePath;
    }

    public void setPrimaryKeyTypePath(String primaryKeyTypePath) {
        this.primaryKeyTypePath = primaryKeyTypePath;
    }

    public String getTableNameExt1() {
        return tableNameExt1;
    }

    public void setTableNameExt1(String tableNameExt1) {
        this.tableNameExt1 = tableNameExt1;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.JSON_STYLE).toString();
    }
}
